﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Treely.Data.Model.Abstract;
using Treely.Data.Model.RandomMath;

namespace Treely.Data.Model
{
    public class Assessment : AuditObject
    {
        [Key]
        public int AssessmentId { get; set; }

        [ForeignKey("User")]
        public string UserId { get; set; }

        public virtual ApplicationUser User { get; set; }

        [ForeignKey("UserChild")]
        public int? UserChildId { get; set; }

        public virtual UserChild UserChild { get; set; }

        public int Correct { get; set; }

        [ForeignKey("MathQuiz")]
        public int? MathQuizId { get; set; }

        public MathQuiz MathQuiz { get; set; }

        public string JSON { get; set; }

        public ICollection<IAnswerable> Questions { get; set; }
    }
}